<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">分销设置</h4>
</div>
<div class="panel-body">
    <div class="panel-body panel" ng-controller="sellSetingCtrl">
        <div>
            <div class="panel-body bg-light">
                <span class="font-bold">分销设置</span>
            </div>
            <div>
                <form name="sellSetingForm" ng-submit="update()">
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label text-right m-t-xs">是否开启分销</label>
                            <div class="col-sm-10">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="sellSetingService.data.isOpenSell" ng-click="select(sellSetingService.data.id,sellSetingService.data.isOpenSell)" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="sellSetingService.data.isOpenSell==1">开启</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="sellSetingService.data.isOpenSell==0">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="" popover-trigger="mouseenter"></i>
                                </div>
                            </div>
                        </div>

                        <div class="form-group" ng-if="sellSetingService.data.isOpenSell==1">
                            <label class="col-sm-2 control-label text-right m-t-xs">是否开启加盟返佣</label>
                            <div class="col-sm-10">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="sellSetingService.data.isJoinRebate" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="sellSetingService.data.isJoinRebate==1">开启</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="sellSetingService.data.isJoinRebate==0">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="" popover-trigger="mouseenter"></i>
                                </div>

                                <div ng-if="sellSetingService.data.isJoinRebate==1">
                                    <span class="inline m-r-xs">返佣值:</span>
                                    <input type="text" class="form-control w-xs inline" maxlength="2" ng-model="sellSetingService.data.joinValue">
                                </div>

                                <div ng-if="sellSetingService.data.isOpenSell==1">
                                    <a ui-sref="app.distribution">设置分销等级>>></a>
                                </div>
                                <div ng-if="sellSetingService.data.isOpenSell==1">
                                    <a ui-sref="app.revenueSetting">设置推荐分润>>></a>
                                </div>
                                <div ng-if="sellSetingService.data.isOpenSell==1">
                                    <a ui-sref="app.benefit">设置让利>>></a>
                                </div>
                            </div>

                        </div>
                    </div>


                    <div class="b-t">
                        <div class="col-sm-4 padder-v col-sm-offset-2">
                            <button type="submit" class="btn btn-success">保存设置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>